1 /* Copyright 2012 The MathWorks, Inc. */
2
3 #ifndef _RTIOSTREAM_UTILS_H_
4 #define _RTIOSTREAM_UTILS_H_
5
6
7 #ifdef __cplusplus
8 extern "C" {
9 #endif
10
11 /* Target-side rtIOStream utility APIs */
12
13 #include "rtwtypes.h" /* include definition of uint32_T */
14 #include <stddef.h> /* include definition of size_t */
15
16 /* MIN utility */
17 #ifndef MIN
18 #define MIN(a,b) ((a) < (b) ? (a) : (b))
19 #endif
20
21 /* Blocks until all requested outgoing data is sent. */
22 extern int rtIOStreamBlockingSend(const int streamID,
23 const void * const src,
24 uint32_T size);
25
26 /* Blocks until all requested incoming data is received. */
27 extern int rtIOStreamBlockingRecv(const int streamID,
28 void * const dst,
29 uint32_T size);
30
31 #ifdef __cplusplus
32 }
33 #endif /* __cplusplus */
34
35 #endif /* _RTIOSTREAM_UTILS_H_ */
36
|